
package com.jf.cloud.multishop.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.multishop.mapper.ShopPaymentBalanceMapper;
import com.jf.cloud.multishop.model.ShopPaymentBalance;
import com.jf.cloud.multishop.service.ShopPaymentBalanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商家余额支付表
 *
 * @author zz
 * @date 2022-06-22 17:09:12
 */
@Service
public class ShopPaymentBalanceServiceImpl implements ShopPaymentBalanceService {

    @Autowired
    private ShopPaymentBalanceMapper shopPaymentBalanceMapper;

    @Override
    public PageVO<ShopPaymentBalance> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> shopPaymentBalanceMapper.list());
    }

    @Override
    public ShopPaymentBalance getByBalancePaymentId(Long balancePaymentId) {
        return shopPaymentBalanceMapper.getByBalancePaymentId(balancePaymentId);
    }

    @Override
    public void save(ShopPaymentBalance shopPaymentBalance) {
        shopPaymentBalanceMapper.save(shopPaymentBalance);
    }

    @Override
    public void update(ShopPaymentBalance shopPaymentBalance) {
        shopPaymentBalanceMapper.update(shopPaymentBalance);
    }

    @Override
    public void deleteById(Long balancePaymentId) {
        shopPaymentBalanceMapper.deleteById(balancePaymentId);
    }
}
